// 引入项目中全部的全局组件
import SvgIcon from './common/SvgIcon.vue'
import Pagination from './common/Pagination.vue'
import Count from '@/components/common/Count.vue'
import * as ElementPlusIconsVue from '@element-plus/icons-vue' //图标

const allGlobalComponents: any = { SvgIcon, Pagination , Count} // 原来写法{"SvgIcon":SvgIcon}

export default {
  install(app: any) {
    Object.keys(allGlobalComponents).forEach((key) => {
      app.component(key, allGlobalComponents[key])
    })
    // 注册全局图标
    for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
      app.component(key, component)
    }
  },
}
